package routers

import (
	"github.com/gin-gonic/gin"
	"mydemo/controllers/admin"
)

func AdminRoutersInit(r *gin.Engine) {
	adminRouters := r.Group("/admin")
	{
		adminRouters.GET("/", admin.IndexController{}.Index)
		adminRouters.GET("/user", admin.UserController{}.Index)
		adminRouters.GET("/user1", func(context *gin.Context) {

		})
		adminRouters.GET("/user/add", admin.UserController{}.Add)
		adminRouters.GET("/user/edit", admin.UserController{}.Edit)
		adminRouters.GET("/user/delete", admin.UserController{}.Delete)

		adminRouters.GET("/article", admin.ArticleController{}.Index)
		adminRouters.GET("/article/add", admin.ArticleController{}.Add)
		adminRouters.GET("/article/edit", admin.ArticleController{}.Edit)

		adminRouters.GET("/nav", admin.NavController{}.Index)
		adminRouters.GET("/nav/add", admin.NavController{}.Add)
		adminRouters.GET("/nav/edit", admin.NavController{}.Edit)
	}
}
